from django.contrib import admin
import xadmin
from .models import Type
from .models import News
from .models import NComment
from .models import NGood
# Register your models here.
class TypeAdmin(object):
    list_display = ('name','status','sort','ctime')
xadmin.site.register(Type, TypeAdmin)

class NewsAdmin(object):
    list_display = ('title','view','comments','goods','status','ctime')
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(News,NewsAdmin)

class NCommentAdmin(object):
    list_display = ('news','user',"ctime")
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(NComment, NCommentAdmin)


class NGoodAdmin(object):
    list_display = ('news','user',"ctime")
    list_per_page = 10
xadmin.site.register(NGood, NGoodAdmin)